#include "stair_ctrl/ros_udp_comm_low.hpp"

int main(int argc, char **argv)
{
    ros::init(argc, argv, "ros_udp_comm_low");
    ros::NodeHandle nh("~");

    int state_rate;
    std::string low_cmd_topic, low_state_topic, udp_state_topic, reset_topic;
    nh.param<int>("state_rate", state_rate, 500);
    nh.param<std::string>("low_cmd_topic", low_cmd_topic, "/stair_ctrl/low_cmd");
    nh.param<std::string>("low_state_topic", low_state_topic, "low_state");
    nh.param<std::string>("udp_state_topic", udp_state_topic, "udp_state");
    nh.param<std::string>("reset_topic", reset_topic, "/stair_ctrl/reset");

    rosUdpCommLow ros_udp_comm = rosUdpCommLow(&nh, state_rate, low_cmd_topic, low_state_topic, udp_state_topic, reset_topic);
    // ros_udp_comm.start(state_rate);
    ros_udp_comm.start();
}